<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>定位</title>

    <!-- 相对定位  以自己为中心定位方式relative -->

    <style>
        .a {
            position: relative;
            width: 100px;
            height: 100px;
            top: 50px;
            left: 50px;
            background-color: aqua;
        }
        
        .b {
            width: 100px;
            height: 100px;
            background-color: aqua;
        }
    </style>

</head>

<body>
    <div class="a">

    </div>

    <div class="b">


    </div>

</body>

</html>